<?php 
class X_ob extends X{
    public static $classesOutputs=array();
    
    public static function getAllOutputs($classes= null){
        $output= "\n";
        foreach((($classes!==null)?$classes:X_ob::$classesOutputs) as $key=>$val)if(isset(X_ob::$classesOutputs[strtolower($key)]))$output.=X_ob::$classesOutputs[strtolower($key)]."\n";
        return $output;
    }
    
    public static function getOutput($className){
        return X_ob::$classesOutputs[$className];
    }
    
    public static function addOutput($className,$output=null){
        if($output != "\n" && !empty($output)){
            X_ob::$classesOutputs[strtolower($className)]=((isset(X_ob::$classesOutputs[strtolower($className)]))? X_ob::$classesOutputs[strtolower($className)]:"").$output;
        }
    }
    
}